<%@ Page Title="" Language="C#" MasterPageFile="~/admin/AdminMasterPage.master" AutoEventWireup="true" 
ValidateRequest="false" CodeFile="Message.aspx.cs" Inherits="admin_user_Message" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div class="contents">
        <table width="100%" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td colspan="2">
                    <h1>Add New Message</h1><asp:Label ID="lblMessageId" Visible="false" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 30%"; valign="top">
                    User Type
                </td>
                <td>
                    <asp:DropDownList ID="ddlUserType" runat="server">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="100">SiteAdmin</asp:ListItem>
                        <asp:ListItem Value="200">SiteUser</asp:ListItem>
                        <asp:ListItem Value="300">Provider</asp:ListItem>
                        <asp:ListItem Value="400">Customer</asp:ListItem>
                        <asp:ListItem Value="500">Advertiser</asp:ListItem>
                        <asp:ListItem Value="600">Guest</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<asp:RequiredFieldValidator ID="rfvUserType" runat="server" ControlToValidate="ddlUserType"
                        ErrorMessage="Choose User Type" InitialValue="-1" ValidationGroup="message">Choose</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Message Type
                </td>
                <td>
                    <asp:DropDownList ID="ddlMessageType" runat="server">
                        <asp:ListItem Selected="True" Value="ALL">Select</asp:ListItem>
                        <asp:ListItem Value="CI">Car Insurance</asp:ListItem>
                        <asp:ListItem Value="TI">Travel Insurance</asp:ListItem>
                        <asp:ListItem Value="PA">Personal Accident</asp:ListItem>
                        <asp:ListItem Value="HL">Home Loan</asp:ListItem>
                        <asp:ListItem Value="PL">Personal Loan</asp:ListItem>
                        <asp:ListItem Value="CC">Cards</asp:ListItem>
                        <asp:ListItem Value="UM">User Message</asp:ListItem>
                        <asp:ListItem Value="CM">Confirm Message</asp:ListItem>
                        <asp:ListItem Value="ER">Error</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<asp:RequiredFieldValidator ID="rfvMessageType" runat="server" ControlToValidate="ddlMessageType"
                        ErrorMessage="Choose Message Type" InitialValue="ALL" ValidationGroup="message">Choose</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Error Code
                </td>
                <td>
                    <asp:TextBox ID="txtErrorCode" runat="server" MaxLength="5" Width="100px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvErrorCode" runat="server" ControlToValidate="txtErrorCode"
                        ErrorMessage="Required" ValidationGroup="message"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revErrorCode" runat="server" ControlToValidate="txtErrorCode"
                        ErrorMessage="Please Enter Only Numbers"  ValidationExpression="^\d+$" ValidationGroup="message"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Tittle
                </td>
                <td>
                    <asp:TextBox ID="txtTittle" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvTittle" runat="server" ControlToValidate="txtTittle"
                        ErrorMessage="Required" ValidationGroup="message"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Header Message
                </td>
                <td>
                    <asp:TextBox ID="txtHeader" runat="server" MaxLength="450" Width="500px" TextMode="MultiLine"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="rfvHeader" runat="server" ControlToValidate="txtHeader"
                        ErrorMessage="Required" ValidationGroup="message"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Body Message
                </td>
                <td>
                    <asp:TextBox ID="txtBody" runat="server" MaxLength="450" Width="500px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Footer Message
                </td>
                <td>
                    <asp:TextBox ID="txtFooter" runat="server" MaxLength="450" Width="500px" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td valign="top">
                    Status
                </td>
                <td>
                    <asp:CheckBox ID="chkStatus" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btnView" runat="server" OnClick="btnView_Click" Text="View" CssClass="btn blue" />
                </td>
                <td>
                    <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit"
                        ValidationGroup="message" CssClass="btn blue" />
                    <asp:Button ID="btnClearForm" runat="server" CausesValidation="False" OnClick="btnClearForm_Click"
                        OnClientClick="return confirm('Are you sure to clear form?');" Text="Clear" CssClass="btn blue" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Label ID="lblMessage" runat="server" ForeColor="Green" Font-Bold="true"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>

